﻿using System;

namespace UDS
{
    /// <summary>
    /// Specify the display name of a field, property or enum.
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Enum)]
    public class DisplayNameAttribute : Attribute
    {
        public bool Visible
        {
            get;
            private set;
        }

        public string Name
        {
            get;
            private set;
        }

        public string Description
        {
            get;
            private set;
        }

        public DisplayNameAttribute(string name)
            : this(name, null, true)
        { }

        public DisplayNameAttribute(string name, bool visible)
            : this(name, null, visible)
        { }

        public DisplayNameAttribute(string name, string description)
            : this(name, description, true)
        { }

        public DisplayNameAttribute(string name, string description, bool visible)
        {
            Name = name;
            Description = description;
            Visible = visible;
        }
    }
}
